package com.heima.wemedia.feign;

import com.heima.api.wemedia.IWemdiaClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.wemedia.service.WmChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName WemediaClient
 * @Description TODO
 * @Author kiku
 * @Date 2024/9/2 14:18
 * @Version 1.0
 */
@RestController
public class WemediaClient implements IWemdiaClient {

    @Autowired
    private WmChannelService wmChannelService;

    @GetMapping("/api/v1/channel/list")
    public ResponseResult getChannels(){
        return wmChannelService.findAll();
    }
}
